package org.sws.domain.strategy.model.entity.rule;

import lombok.*;
import org.sws.domain.strategy.enums.RuleLogicCheckTypeVO;

/**
 * @Author sws
 * @Date 2025/2/17 21:31
 * @description: 抽奖动作实体类
 *
 */
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
public class RuleActionEntity<T extends RuleActionEntity.RaffleEntity> {
    private T data;
    private String code = RuleLogicCheckTypeVO.ALLOW.getCode();
    private String info = RuleLogicCheckTypeVO.ALLOW.getInfo();
    private String ruleModel;


    public static class RaffleEntity {
    }


    @EqualsAndHashCode(callSuper = true)
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    @Data
    public static class beforeRaffleEntity extends RaffleEntity {
        /**
         * 策略ID
         */
        private Long strategyId;

        /**
         * 权重值Key；用于抽奖时可以选择权重抽奖。
         */
        private String ruleWeightValueKey;

        /**
         * 奖品ID；(用于黑名单用户，直接返回黑名单奖品id)
         */
        private Integer awardId;
    }


    @EqualsAndHashCode(callSuper = true)
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    @Data
    public static class centerRaffleEntity extends RaffleEntity {
        /**
         * 随机积分值
         */
        private Integer randomAwardScore;
    }



    public static class afterRaffleEntity extends RaffleEntity {

    }

}
